﻿<%@ Page Language="C#" AutoEventWireup="true" CodeBehind="register.aspx.cs" Inherits="Hired.createaccount"
    MasterPageFile="Hired1Div.master" %>

<asp:Content ID="Content1" runat="server" ContentPlaceHolderID="HeadPlaceHolder">
    <style type="text/css">
        .line_particulars
        {
            float: left;
            margin-left: 10px;
            width: 997px;
            height: 19px;
            background: url(images/linePart.png);
        }
        
         .line_account
        {
            float: left;
            margin-left: 9px;
            width: 1002px;
            height: 19px;
            background: url(images/Account-Text.png);
        }
        
        .line_education
        {
            float: left;
            margin-top: 40px;
            margin-left: 10px;
            width: 996px;
            height: 20px;
            background: url(images/lineEducation.png);
        }
        
        .line_employment
        {
            float: left;
            margin-top: 40px;
            margin-left: 10px;
            width: 996px;
            height: 20px;
            background: url(images/lineEmployment.png);
        }
        
        .line_uploaddoc
        {
            float: left;
            margin-top: 40px;
            margin-left: 10px;
            width: 997px;
            height: 20px;
            background: url(images/lineUploadDoc.png);
        }
        .ca_submit
        {
            float: right;
            padding-top: 40px;
            padding-right: 15px;
            width: 400px;
            text-align: right;
        }
        p.register
        {
            padding-right: 0px;
            margin-top: 28px;
        }
        .style1
        {
            float: left;
            width: 50%;
        }
        .style3
        {
            width: 121px;
        }
        .accountsettings
        {
            float: left;
            margin: 30px auto auto 350px;
        }
        .style4
        {
            width: 139px;
        }
        </style>
        <!-- jquery enter code -->
        <script type="text/javascript">
            $(document).ready(function () {
                $('[id$=txtUsername]').keydown(function () {
                    enterNoSubmit('[id$=txtPassword]');
                });
                $('[id$=txtPassword]').keydown(function () {
                    enterNoSubmit('[id$=txtFirstName]');
                });
                $('[id$=txtFirstName]').keydown(function () {
                    enterNoSubmit('[id$=txtLastName]');
                });
                $('[id$=txtLastName]').keydown(function () {
                    enterNoSubmit('[id$=txtEmail]');
                });
                $('[id$=txtEmail]').keydown(function () {
                    enterNoSubmit('[id$=ddlGender]');
                });
                $('[id$=ddlGender]').keydown(function () {
                    enterNoSubmit('[id$=txtDateOfBirth]');
                });
                $('[id$=txtDateOfBirth]').keydown(function () {
                    enterNoSubmit('[id$=txtHomeNumber]');
                });
                $('[id$=txtHomeNumber]').keydown(function () {
                    enterNoSubmit('[id$=txtMobileNumber]');
                });
                $('[id$=txtDateOfBirth]').keydown(function () {
                    enterNoSubmit('[id$=txtHomeNumber]');
                });
                $('[id$=txtHomeNumber]').keydown(function () {
                    enterNoSubmit('[id$=txtMobileNumber]');
                });
                $('[id$=txtMobileNumber]').keydown(function () {
                    enterNoSubmit('[id$=txtNationality]');
                });
                $('[id$=txtNationality]').keydown(function () {
                    enterNoSubmit('[id$=ddlCountryOfResidence]');
                });
                $('[id$=ddlCountryOfResidence]').keydown(function () {
                    enterNoSubmit('[id$=txtAddress1]');
                });
                $('[id$=txtAddress1]').keydown(function () {
                    enterNoSubmit('[id$=txtAddress2]');
                });
                $('[id$=txtAddress2]').keydown(function () {
                    enterNoSubmit('[id$=Address3]');
                });
                $('[id$=Address3]').keydown(function () {
                    enterNoSubmit('[id$=txtPostalCode]');
                });
                $('[id$=txtPostalCode]').keydown(function () {
                    enterNoSubmit('[id$=ddlEducationLevel]');
                });
                $('[id$=ddlEducationLevel]').keydown(function () {
                    enterNoSubmit('[id$=txtPreviousEducationalInstitute]');
                });
                $('[id$=txtPreviousEducationalInstitute]').keydown(function () {
                    enterNoSubmit('[id$=ddlJobIndustry]');
                });
                $('[id$=ddlJobIndustry]').keydown(function () {
                    enterNoSubmit('[id$=txtPreviousEmployment]');
                });
                $('[id$=txtPreviousEmployment]').keydown(function () {
                    enterSubmit('[id$=btnSave]');
                });
            });
        </script>
</asp:Content>
<asp:Content ID="Content2" runat="server" ContentPlaceHolderID="MainPlaceHolder">
    &nbsp;<div class="line_account"></div>
    <table width="100%">
        <tr>
            <td style="text-align: right" class="style3">
        <span class="req_field">*</span>Username:</td>
            <td>
        <asp:TextBox ID="txtUsername" runat="server" MaxLength="50"></asp:TextBox>
                <asp:RequiredFieldValidator ID="RequiredFieldUsername" runat="server" 
                    ErrorMessage="Required Field" ForeColor="Red" Display="Dynamic" 
                    Font-Size="X-Small" ControlToValidate="txtUsername" 
                    ValidationGroup="RegisterGroup"></asp:RequiredFieldValidator>
                <asp:RegularExpressionValidator ID="RegularExpressionUsername" runat="server" 
                    ControlToValidate="txtUsername" Display="Dynamic"
                    ErrorMessage="Username should contain only alphabets, numbers, and underscores" Font-Size="X-Small" 
                    ForeColor="Red" ValidationExpression="^[a-zA-Z0-9_]*$"
                    ValidationGroup="RegisterGroup"></asp:RegularExpressionValidator>
           
                <asp:CustomValidator ID="CustomUsername" runat="server" 
                    ControlToValidate="txtUsername" Display="Dynamic" ErrorMessage="Username already in use" 
                    Font-Size="X-Small" ForeColor="Red" ValidationGroup="RegisterGroup" 
                    onservervalidate="CustomUsername_ServerValidate"></asp:CustomValidator>
           
            </td>
        </tr>
        <tr>
            <td style="text-align: right">
        <span class="req_field">*</span>Password:</td>
            <td>
        <asp:TextBox ID="txtPassword" runat="server" TextMode="Password" MaxLength="18"></asp:TextBox>
             <asp:RequiredFieldValidator ID="RequiredFieldPassword" runat="server" 
                    Display="Dynamic" ErrorMessage="Required Field" Font-Size="X-Small" 
                    ForeColor="Red" ControlToValidate="txtPassword"
                    ValidationGroup="RegisterGroup"></asp:RequiredFieldValidator>
                <asp:RegularExpressionValidator ID="RegularExpressionPassword" runat="server" 
                    ControlToValidate="txtPassword" Display="Dynamic" 
                    
                    
                    
                    ErrorMessage="Password should contain only alphabets and numbers, and have a length of 6-18" Font-Size="X-Small" 
                    ForeColor="Red" ValidationExpression="^[a-zA-Z0-9]{6,18}$"
                    ValidationGroup="RegisterGroup"></asp:RegularExpressionValidator>
           
            </td>
        </tr>
        <tr>
            <td style="text-align: right">
        <span class="req_field">*</span>Re-enter Password:</td>
            <td>
        <asp:TextBox ID="txtReenterPassword" runat="server" TextMode="Password" MaxLength="18"></asp:TextBox>
             <asp:RequiredFieldValidator ID="RequiredFieldReenterPassword" runat="server" 
                    Display="Dynamic" ErrorMessage="Required Field" Font-Size="X-Small" 
                    ForeColor="Red" ControlToValidate="txtReenterPassword"
                    ValidationGroup="RegisterGroup"></asp:RequiredFieldValidator>
                <asp:CompareValidator ID="CompareValidatorPassword" runat="server" 
                    ControlToCompare="txtPassword" ControlToValidate="txtReenterPassword" 
                    ErrorMessage="Passwords do not match" Font-Size="X-Small" ForeColor="Red"
                    ValidationGroup="RegisterGroup"></asp:CompareValidator>
            </td>
        </tr>
        <tr>
            <td style="text-align: right;">
            <span class="req_field">*</span>Security Question:
            </td>
            <td>
                <asp:DropDownList ID="ddlSecurityQuestion" runat="server">
                    <asp:ListItem>Please select a security question</asp:ListItem>
                    <asp:ListItem>What is the name of your first teacher?</asp:ListItem>
                    <asp:ListItem>What is the name of your first pet?</asp:ListItem>
                    <asp:ListItem>What is the name of the first company you worked for?</asp:ListItem>
                    <asp:ListItem>What is the model of the first car you owned?</asp:ListItem>
                    <asp:ListItem>What was your favourite book as a child?</asp:ListItem>
                    <asp:ListItem>What was your favourite dessert as a child?</asp:ListItem>
                    <asp:ListItem>What was your favourite movie as a teenager?</asp:ListItem>
                    <asp:ListItem>Where did you take your first vacation?</asp:ListItem>
                    <asp:ListItem>Who was your favourite musical artist as a teenager?</asp:ListItem>
                </asp:DropDownList>
                <asp:RequiredFieldValidator ID="RequiredFieldSecurityQuestion" runat="server" 
                    Display="Dynamic" ErrorMessage="Required Field" Font-Size="X-Small" 
                    ForeColor="Red" ControlToValidate="ddlSecurityQuestion"
                    ValidationGroup="RegisterGroup" 
                    InitialValue="Please select a security question"></asp:RequiredFieldValidator>
            </td>
        </tr>
        <tr>
            <td style="text-align: right;">
            <span class="req_field">*</span>Security Answer:
            </td>
            <td>
        <asp:TextBox ID="txtSecurityAnswer" runat="server" MaxLength="18" 
                    Width="270px"></asp:TextBox>
                <asp:RequiredFieldValidator ID="RequiredFieldSecurityAnswer" runat="server" 
                    Display="Dynamic" ErrorMessage="Required Field" Font-Size="X-Small" 
                    ForeColor="Red" ControlToValidate="txtSecurityAnswer"
                    ValidationGroup="RegisterGroup"></asp:RequiredFieldValidator>
            </td>
        </tr>
    </table>
    <div class="line_particulars">
    </div>

    <table style="float: left; width:45%;">
        <tr>
            <td style="text-align: right">
        <span class="req_field">*</span>First Name:</td>
            <td>
        <asp:TextBox ID="txtFirstName" runat="server"></asp:TextBox>
                <asp:RequiredFieldValidator ID="RequiredFieldFirstname" runat="server" 
                    Display="Dynamic" ErrorMessage="Required Field" Font-Size="X-Small" 
                    ForeColor="Red" ControlToValidate="txtFirstName"
                    ValidationGroup="RegisterGroup"></asp:RequiredFieldValidator>
            </td>
        </tr>
        <tr>
            <td style="text-align: right">
        <span class="req_field">*</span>Last Name:</td>
            <td>
        <asp:TextBox ID="txtLastName" runat="server"></asp:TextBox>
                <asp:RequiredFieldValidator ID="RequiredFieldLastname" runat="server" 
                    Display="Dynamic" ErrorMessage="Required Field" Font-Size="X-Small" 
                    ForeColor="Red" ControlToValidate="txtLastName"
                    ValidationGroup="RegisterGroup"></asp:RequiredFieldValidator>
            </td>
        </tr>
        <tr>
            <td style="text-align: right">
        <span class="req_field">*</span>E-mail:</td>
            <td>
        <asp:TextBox ID="txtEmail" runat="server"></asp:TextBox>
                <asp:RequiredFieldValidator ID="RequiredFieldEmail" runat="server" 
                    Display="Dynamic" ErrorMessage="Required Field" Font-Size="X-Small" 
                    ForeColor="Red" ControlToValidate="txtEmail"
                    ValidationGroup="RegisterGroup"></asp:RequiredFieldValidator>
                <asp:RegularExpressionValidator ID="RegularExpressionEmail"
                    runat="server" Display="Dynamic" ErrorMessage="E-mail address is invalid"
                    Font-Size="X-Small" ForeColor="Red" ControlToValidate="txtEmail"
                    ValidationExpression="\w+([-+.']\w+)*@\w+([-.]\w+)*\.\w+([-.]\w+)*" 
                    ValidationGroup="RegisterGroup"></asp:RegularExpressionValidator>
                
                <asp:CustomValidator ID="CustomEmail" runat="server" 
                    ControlToValidate="txtEmail" Display="Dynamic" ErrorMessage="E-mail address already in use" 
                    Font-Size="X-Small" ForeColor="Red" ValidationGroup="RegisterGroup" 
                    onservervalidate="CustomEmail_ServerValidate"></asp:CustomValidator>
           
            </td>
        </tr>
        <tr>
            <td style="text-align: right">
        <span class="req_field">*</span>Gender:</td>
            <td>
        <asp:DropDownList ID="ddlGender" runat="server">
            <asp:ListItem>Select gender</asp:ListItem>
            <asp:ListItem>Male</asp:ListItem>
            <asp:ListItem>Female</asp:ListItem>
        </asp:DropDownList>
                <asp:RequiredFieldValidator ID="RequiredFieldGender" runat="server" 
                    ErrorMessage="Required Field " Font-Size="X-Small" ForeColor="Red" 
                    ControlToValidate="ddlGender" ValidationGroup="RegisterGroup" 
                    InitialValue="Select gender"></asp:RequiredFieldValidator>
            </td>
        </tr>
        <tr>
            <td style="text-align: right">
        <span class="req_field">*</span>Date of Birth:</td>
            <td>
        <asp:TextBox ID="txtDateOfBirth" runat="server" Width="160px"></asp:TextBox>
                <asp:RegularExpressionValidator ID="RegularExpressionDOB" runat="server" 
                    ControlToValidate="txtDateOfBirth" Display="Dynamic" 
                    ErrorMessage="Date of Birth must be dd-mm-yyyy" Font-Size="X-Small" 
                    ForeColor="Red" 
                    ValidationExpression="^(0[1-9]|[12][0-9]|3[01])[-](0[1-9]|1[012])[-](19|20)\d\d$"
                    ValidationGroup="RegisterGroup"></asp:RegularExpressionValidator>
                <asp:RequiredFieldValidator ID="RequiredFieldDOB" runat="server" 
                    Display="Dynamic" ErrorMessage="Required Field" Font-Size="X-Small" 
                    ForeColor="Red" ControlToValidate="txtDateOfBirth"
                    ValidationGroup="RegisterGroup"></asp:RequiredFieldValidator>
           
                <asp:CustomValidator ID="CustomDOB" runat="server" 
                    ControlToValidate="txtDateOfBirth" Display="Dynamic" ErrorMessage="You must be at least 16 years old to register" 
                    Font-Size="X-Small" ForeColor="Red" ValidationGroup="RegisterGroup" 
                    onservervalidate="CustomDOB_ServerValidate"></asp:CustomValidator>
           
            </td>
        </tr>
        <tr>
            <td style="text-align: right">
                Contact Number (H):</td>
            <td>
                <br />
                <asp:TextBox ID="txtHomeNumber" runat="server" Width="128px"></asp:TextBox>
                <asp:RegularExpressionValidator ID="RegularExpressionHP" runat="server" 
                    ControlToValidate="txtHomeNumber" ErrorMessage="Please enter only number" 
                    Font-Size="X-Small" ForeColor="Red" ValidationExpression="^[+]?\d+$"
                    ValidationGroup="RegisterGroup"></asp:RegularExpressionValidator>
            </td>
        </tr>
        <tr>
            <td style="text-align: right">
                (M):</td>
            <td>
                <asp:TextBox ID="txtMobileNumber" runat="server" Width="128px"></asp:TextBox>
                <asp:RegularExpressionValidator ID="RegularExpressionM" runat="server" 
                    ControlToValidate="txtMobileNumber" ErrorMessage="Please enter only number" 
                    Font-Size="X-Small" ForeColor="Red" 
                    ValidationExpression="^[+]?\d+$" ValidationGroup="RegisterGroup">
                    </asp:RegularExpressionValidator>
            </td>
        </tr>
    </table>


    <table style="float: left; width:55%;">
        <tr>
            <td style="text-align: right" class="style4">
        <span class="req_field">*</span>Nationality:</td>
            <td>
        <asp:TextBox ID="txtNationality" runat="server"></asp:TextBox>
                <asp:RequiredFieldValidator ID="RequiredFieldNationality" runat="server" 
                    Display="Dynamic" ErrorMessage="Required Field" Font-Size="X-Small" 
                    ForeColor="Red" ControlToValidate="txtNationality" ValidationGroup="RegisterGroup">
                    </asp:RequiredFieldValidator>
            </td>
        </tr>
        <tr>
            <td style="text-align: right" class="style4">
        <span class="req_field">*</span>Country of Residence:</td>
            <td>
                <asp:DropDownList ID="ddlCountryOfResidence" runat="server">
                    <asp:ListItem>Select a country</asp:ListItem>
                </asp:DropDownList>
                <asp:RequiredFieldValidator ID="RequiredFieldCOR" runat="server" 
                    ControlToValidate="ddlCountryOfResidence" Display="Dynamic" 
                    ErrorMessage="Required Field" Font-Size="X-Small" ForeColor="Red"
                    ValidationGroup="RegisterGroup" InitialValue="Select a country"></asp:RequiredFieldValidator>
            </td>
        </tr>
        <tr>
            <td style="text-align: right" class="style4">
        <span class="req_field">*</span>Address:</td>
            <td>
        <asp:TextBox ID="txtAddress1" runat="server"></asp:TextBox>
                <asp:RequiredFieldValidator ID="RequiredFieldAddress" runat="server" 
                    Display="Dynamic" ErrorMessage="Required Field" Font-Size="X-Small" 
                    ForeColor="Red" ControlToValidate="txtAddress1"
                    ValidationGroup="RegisterGroup"></asp:RequiredFieldValidator>
            </td>
        </tr>
        <tr>
            <td class="style4">
                &nbsp;</td>
            <td>
        <asp:TextBox ID="txtAddress2" runat="server"></asp:TextBox>
            </td>
        </tr>
        <tr>
            <td class="style4">
                &nbsp;</td>
            <td>
        <asp:TextBox ID="txtAddress3" runat="server"></asp:TextBox>
            </td>
        </tr>
        <tr>
            <td style="text-align: right" class="style4">
       <span class="req_field">*</span>ZIP/Postal Code:</td>
            <td>
        <asp:TextBox ID="txtPostalCode" runat="server"></asp:TextBox>
                <asp:RequiredFieldValidator ID="RequiredFieldPostalCode" runat="server" 
                    Display="Dynamic" ErrorMessage="Required Field" Font-Size="X-Small" 
                    ForeColor="Red" ControlToValidate="txtPostalCode"
                    ValidationGroup="RegisterGroup"></asp:RequiredFieldValidator>
            </td>
        </tr>
        <tr>
            <td style="text-align: right" class="style4">
            Personal Website:</td>
            <td>
        <asp:TextBox ID="txtWebsiteURL" runat="server"></asp:TextBox>
                <asp:RegularExpressionValidator ID="RegularExpressionWebsiteURL"
                        runat="server"  ControlToValidate="txtWebsiteUrl"
                        ErrorMessage="Invalid Website" Font-Size="X-Small" ForeColor="Red" 
                        ValidationExpression="http(s)?://([\w-]+\.)+[\w-]+(/[\w- ./?%&amp;=]*)?"></asp:RegularExpressionValidator>
            </td>
        </tr>
    </table>
    <div class="line-clear">
    </div>
    <div class="line_education">
    </div>

    <table class="style1">
        <tr>
            <td style="text-align: right">
                <span class="req_field">*</span>Education Level:</td>
            <td>
        <asp:DropDownList ID="ddlEducationLevel" runat="server">
            <asp:ListItem>Select an education level</asp:ListItem>
            <asp:ListItem>PSLE</asp:ListItem>
            <asp:ListItem>GCE &#39;N&#39; Level</asp:ListItem>
            <asp:ListItem>GCE &#39;O&#39; Level</asp:ListItem>
            <asp:ListItem>GCE &#39;A&#39; Level</asp:ListItem>
            <asp:ListItem>International Baccalaureate</asp:ListItem>
            <asp:ListItem>Diploma</asp:ListItem>
            <asp:ListItem>Bachelor&#39;s degree</asp:ListItem>
            <asp:ListItem>Master&#39;s degree</asp:ListItem>
            <asp:ListItem>Other</asp:ListItem>
        </asp:DropDownList>
                <asp:RequiredFieldValidator ID="RequiredFieldEduLvl" runat="server" 
                    ErrorMessage="Required Field" Font-Size="X-Small" ForeColor="Red" 
                    ControlToValidate="ddlEducationLevel" Display="Dynamic"
                    ValidationGroup="RegisterGroup" InitialValue="Select an education level"></asp:RequiredFieldValidator>
            </td>
        </tr>
    </table>
    <table class="style1">
        <tr>
            <td style="text-align: right">
                <span class="req_field">*</span>Previous Educational Institute:<br /></td>
            <td>
                <asp:TextBox ID="txtPreviousEducationalInstitute" runat="server"></asp:TextBox>

                <asp:RequiredFieldValidator ID="RequiredFieldPreviousEdu" runat="server" 
                    Display="Dynamic" ErrorMessage="Required Field" Font-Size="X-Small" 
                    ForeColor="Red" ControlToValidate="txtPreviousEducationalInstitute"
                    ValidationGroup="RegisterGroup"></asp:RequiredFieldValidator>

            </td>
        </tr>
    </table>

    <div class="line-clear">
    </div>
    <div class="line_employment">
    </div>
    <table class="style1">
        <tr>
            <td style="text-align: right">
                Specialization:</td>
            <td>
                <asp:DropDownList ID="ddlSpecialization" runat="server">
                    <asp:ListItem>N/A</asp:ListItem>
                <asp:ListItem>Accounting</asp:ListItem>
                <asp:ListItem>Administration</asp:ListItem>
                <asp:ListItem>Arts, Media &amp; Communication</asp:ListItem>
                <asp:ListItem>Computing</asp:ListItem>
                <asp:ListItem>Construction</asp:ListItem>
                <asp:ListItem>Education</asp:ListItem>
                <asp:ListItem>Engineering</asp:ListItem>
                <asp:ListItem>Healthcare</asp:ListItem>
                <asp:ListItem>Hotels &amp; Restaurants</asp:ListItem>
                <asp:ListItem>Manufacturing</asp:ListItem>
                <asp:ListItem>Sales &amp; Marketing</asp:ListItem>
                <asp:ListItem>Sciences</asp:ListItem>
                <asp:ListItem>Services</asp:ListItem>
                </asp:DropDownList>
            </td>
        </tr>
        <tr>
            <td style="text-align: right">
                Current Employment:</td>
            <td>
                <asp:TextBox ID="txtCurrentEmployment" runat="server"></asp:TextBox>
            </td>
        </tr>
    </table>
    <table class="style1">
        <tr>
            <td style="text-align: right">
                Previous Employment:</td>
            <td>
                <asp:TextBox ID="txtPreviousEmployment" runat="server"></asp:TextBox>
            </td>
        </tr>
    </table>
        <div class="line_uploaddoc">
        </div>

        <table class="style1">
            <tr>
                <td style="text-align: right">
                    Resume:</td>
                <td>
                    <asp:FileUpload ID="fileUploadResume" runat="server"/>
                    <asp:Label ID="lblResumeUploadError" runat="server" Font-Size="X-Small" 
                        ForeColor="Red" Text="Error uploading resume" Visible="False"></asp:Label>
                </td>
            </tr>
    </table>
    <table class="style1">
        <tr>
            <td style="text-align: right">
                &nbsp;</td>
            <td>
                &nbsp;</td>
        </tr>
    </table>
    <div class="line-clear"></div>
    <div class="accountsettings">
        <asp:CheckBoxList ID="cblAccountSettings" runat="server">
            <asp:ListItem>Do you wish to receive messages from other users?</asp:ListItem>
            <asp:ListItem>Do you wish to receive notifications from Hired.com?</asp:ListItem>
        </asp:CheckBoxList>
    </div>
    <div class="line-clear"></div>
    <div class="ca_submit">
        <asp:ImageButton ID="btnSave" runat="server" ImageUrl="~/Images/caBtnSave.png" 
            onclick="btnSave_Click" ValidationGroup="RegisterGroup" />
        &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
        <a href="javascript:caBtnCancel_Click()" onmouseover="this.style.cursor='hand'"><img src="images/caBtnCancel.png" /></a>
    </div>
</asp:Content>
